/*********************/
/** ControlLightSetting.java */
/*********************/
package atag.apps.mainApp;

import atag.runtime.DataItem;
import atag.runtime.DataPool;
import atag.runtime.NodeInfo;

public class ControlLightSetting implements Runnable {


   private NodeInfo m_myState;
   private DataPool m_dataPool;

	/** Creates a new instance of ControlLightSetting */
	public ControlLightSetting(DataPool dp, NodeInfo myconfig) {
		m_dataPool=SharedStoreForGUITasks.m_dataPool = dp;
		m_myState=SharedStoreForGUITasks.m_myState = myconfig;
	}

	public void run() {
		/*Checking for each DataItem, to see which one was produced*/
		DataItem t_dataItem;
		if((t_dataItem = m_dataPool.getData(IDConstants.T_CONTROLLIGHTSETTING,
			IDConstants.D_LIGHTINFORESPONSE)) != null){
			LightInfoResponse recvdLightInfoResponse = (LightInfoResponse) t_dataItem.core();
			this.handleLightInfoResponseProduced(recvdLightInfoResponse);
		}else if((t_dataItem = m_dataPool.getData(IDConstants.T_CONTROLLIGHTSETTING,
			IDConstants.D_LIGHTINFORESPONSE)) != null){
			LightInfoResponse recvdLightInfoResponse = (LightInfoResponse) t_dataItem.core();
			this.handleLightInfoResponseProduced(recvdLightInfoResponse);
		}
	}

	private void handleLightInfoResponseProduced(
			LightInfoResponse r_LightInfoResponse) {
		// Nothing in non android
	}
	
}
